var treemapOption = function (data,xName,yName,head,subhead){
	var treemapData = [];
	for(var i=0; i<data.length; i++){
		 var temp = { "name": data[i][xName],"value": parseInt(data[i][yName])};
		
		 treemapData.push(temp);
	}
	return  {
	    title : {
	        text: '手机占有率',
	        subtext: '虚构数据'
	    },
	    tooltip : {
	        trigger: 'item',
	        formatter: "{b}: {c}"
	    },
	    toolbox: {
	        show : true,
	        feature : {
	            mark : {show: true},
	            dataView : {show: true, readOnly: false},
	            restore : {show: true},
	            saveAsImage : {show: true}
	        }
	    },
	    calculable : false,
	    series : [
	        {
	            name:'矩形图',
	            type:'treemap',
	            itemStyle: {
	                normal: {
	                    label: {
	                        show: true,
	                        formatter: "{b}"
	                    },
	                    borderWidth: 1
	                },
	                emphasis: {
	                    label: {
	                        show: true
	                    }
	                }
	            },
	            data:treemapData
	        }
	    ]
	};
	                    
	
	
}